import Vue from 'vue'
import Router from 'vue-router'
import First from '../views/first.vue'
import Tabledemo from '../views/tabledemo.vue'
import Tabledemo2 from '../views/tabledemo2.vue'
import Chartdemo1 from '../views/chartdemo1.vue'
import LeafletMap from '../views/leafletmap.vue'
import MapBoxMap from '../views/mapboxmap.vue'
import FullSearch from '../views/FullSearchView.vue'
import ReadPDF from '../views/readpdfView.vue'

Vue.use(Router)

export default new Router({
  //base:'NiceNextStep', //生产环境中使用
  mode: 'history',
  scrollBehavior: () => ({ y: 0 }),
  routes: [
    { path: '/', redirect: '/index' },
    { path: '/index', component: First },
    { path: '/tabledemo', component: Tabledemo },
    { path: '/tabledemo2', component: Tabledemo2 },
    { path: '/chartdemo1', component: Chartdemo1 },
    { path: '/leafletmap', component: LeafletMap },
    { path: '/mapboxmap', component: MapBoxMap },
    { path: '/search/:word',name:'search', component: FullSearch },
    { path: '/readpdf', component: ReadPDF }
  ]
})
